package com.our.sys.project1.entity;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Transient;

import org.springside.modules.orm.grid.ViewField;

/**
 * 备码
 * @author acer
 *
 */
@Entity
@Table(name = "T_ReadyCode")
public class ReadyCode implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 7277586676122778212L;
    @ViewField
    private Long id;
    @ViewField
    private Long materialId;

    @ViewField(header = "类别", width = 100, align = "left")
    private String type;

    @ViewField(header = "品牌名", width = 100, align = "left")
    private String name;

    @ViewField(header = "厂家耗材名", width = 100, align = "left")
    private String materialName;

    @ViewField(header = "规格", width = 100, align = "left")
    private String spec;

    @ViewField(header = "单位", width = 100, align = "left")
    private String unit;

    @ViewField(header = "数量", width = 100, align = "left")
    private Long amount;

    @ViewField(header = "参考进价", width = 100, align = "left")
    private BigDecimal price;

    @ViewField(header = "对应消耗品", width = 100, align = "left")
    private String consum;

    @ViewField(header = "管理码", width = 100, align = "left")
    private String managerCode;

    private Long readyUId;//用来表示同一个高值耗材，第一次简历这条记录的id

    private Long discountId;

    @ViewField(header = "备码次数", width = 100, align = "left")
    private Long readyCodeNumber;

    @ViewField(header = "厂家码", width = 100, align = "left")
    private String factoryCode;

    @ViewField
    private Long supplierId;

    @ViewField(header = "供应商", width = 100, align = "left")
    private String supplierName;

    @ViewField(header = "营业执照注册号", width = 100, align = "left")
    private String regNo;

    @ViewField(header = "备码日期", width = 100, align = "left")
    private String readyCodeTime;

    @ViewField(header = "备码人", width = 100, align = "left")
    private String readyCodeWho;

    @ViewField(header = "材料状态", width = 100, align = "left")
    private String readyCodeState;//0,备码；1,备货；2,取消备码；3,配发；4,已划价;5，已入库

    @ViewField(header = "取消日期", width = 100, align = "left")
    private String cancelCodeTime;

    @ViewField(header = "取消人", width = 100, align = "left")
    private String cancelCodeWho;

    @ViewField(header = "有效日期", width = 100, align = "left")
    private String endTime;

    @ViewField(header = "有效状态", width = 100, align = "left")
    private String state;

    @ViewField(header = "备货日期", width = 100, align = "left")
    private String readyGoodsTime;

    @ViewField(header = "备货人", width = 100, align = "left")
    private String readyGoodsWho;

    @ViewField
    private Long readySendId;

    @Id
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "Id_Generator")
    @TableGenerator(name = "Id_Generator", table = "ID_GENERATOR", pkColumnName = "GEN_NAME", valueColumnName = "GEN_VAL", pkColumnValue = "T_ReadyCode")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getMaterialId() {
        return materialId;
    }

    public void setMaterialId(Long materialId) {
        this.materialId = materialId;
    }

    @Transient
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMaterialName() {
        return materialName;
    }

    public void setMaterialName(String materialName) {
        this.materialName = materialName;
    }

    @Transient
    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    @Transient
    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Transient
    public String getConsum() {
        return consum;
    }

    public void setConsum(String consum) {
        this.consum = consum;
    }

    public String getManagerCode() {
        return managerCode;
    }

    public void setManagerCode(String managerCode) {
        this.managerCode = managerCode;
    }

    public String getFactoryCode() {
        return factoryCode;
    }

    public void setFactoryCode(String factoryCode) {
        this.factoryCode = factoryCode;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    @Transient
    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    @Transient
    public String getRegNo() {
        return regNo;
    }

    public void setRegNo(String regNo) {
        this.regNo = regNo;
    }

    public String getReadyCodeTime() {
        return readyCodeTime;
    }

    public void setReadyCodeTime(String readyCodeTime) {
        this.readyCodeTime = readyCodeTime;
    }

    public String getReadyCodeWho() {
        return readyCodeWho;
    }

    public void setReadyCodeWho(String readyCodeWho) {
        this.readyCodeWho = readyCodeWho;
    }

    public String getReadyCodeState() {
        return readyCodeState;
    }

    public void setReadyCodeState(String readyCodeState) {
        this.readyCodeState = readyCodeState;
    }

    public String getCancelCodeTime() {
        return cancelCodeTime;
    }

    public void setCancelCodeTime(String cancelCodeTime) {
        this.cancelCodeTime = cancelCodeTime;
    }

    public String getCancelCodeWho() {
        return cancelCodeWho;
    }

    public void setCancelCodeWho(String cancelCodeWho) {
        this.cancelCodeWho = cancelCodeWho;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    @Transient
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Long getReadyUId() {
        return readyUId;
    }

    public void setReadyUId(Long readyUId) {
        this.readyUId = readyUId;
    }

    public Long getReadyCodeNumber() {
        return readyCodeNumber;
    }

    public void setReadyCodeNumber(Long readyCodeNumber) {
        this.readyCodeNumber = readyCodeNumber;
    }

    public String getReadyGoodsTime() {
        return readyGoodsTime;
    }

    public void setReadyGoodsTime(String readyGoodsTime) {
        this.readyGoodsTime = readyGoodsTime;
    }

    public String getReadyGoodsWho() {
        return readyGoodsWho;
    }

    public void setReadyGoodsWho(String readyGoodsWho) {
        this.readyGoodsWho = readyGoodsWho;
    }

    public Long getReadySendId() {
        return readySendId;
    }

    public void setReadySendId(Long readySendId) {
        this.readySendId = readySendId;
    }

    public Long getAmount() {
        return amount;
    }

    public void setAmount(Long amount) {
        this.amount = amount;
    }

    public Long getDiscountId() {
        return discountId;
    }

    public void setDiscountId(Long discountId) {
        this.discountId = discountId;
    }

}
